﻿using System;
using System.ComponentModel.DataAnnotations.Schema;
using DapperExtensions.Mapper;
namespace LS.Entitys
{
    /// <summary>
    /// 用户表管理
    /// </summary>
    [Table("sys_user")]
    public class SysUserEntity:EntityBaseDateDel
    {

        /// <summary>
        /// 用户名称
        /// </summary>
        public string UserName { get; set; }
      
        /// <summary>
        /// 用户密码
        /// </summary>
       public string UserPwd { get; set; }

        /// <summary>
        /// 用户姓名
        /// </summary>
        public string RealName { get; set; }

        /// <summary>
        /// 性别 1男 2女 0保密
        /// </summary>
        public int Sex { get; set; }

        /// <summary>
        /// 头像地址
        /// </summary>
        public string Avatar { get; set; }

        /// <summary>
        /// 手机号
        /// </summary>
        public string Mobile { get; set; }

        /// <summary>
        /// 邮箱
        /// </summary>
        public string Email { get; set; }

        /// <summary>
        /// 是否启用 1=是 0=否
        /// </summary>
        public bool? Isenable { get; set; }

        /// <summary>
        /// 用户类型 从字典读取用户类型
        /// </summary>
        public int UserType { get; set; }

        /// <summary>
        /// 角色
        /// </summary>
        public string RoleCode { get; set; }

       /// <summary>
       /// 用户状态 1=审核 0=未审核
       /// </summary>
        public int? UserStatus { get; set; }

        /// <summary>
        /// 用户类型
        /// </summary>
        public string UserTypeName { get; set; }

        /// <summary>
        /// 企业Id
        /// </summary>
        public long? CompanyId { get; set; }

        /// <summary>
        /// 企业名称
        /// </summary>
        public string CompanyName { get; set; }

        /// <summary>
        /// 身份证正面照片
        /// </summary>
        public string CardJustImg { get; set; }

        /// <summary>
        /// 身份证反面照片
        /// </summary>
        public string CardBackImg { get; set; }

        /// <summary>
        /// 身份证号
        /// </summary>
        public string CardID { get; set; }


        /// <summary>
        /// 用户关联Id 如：企业用户关联企业Id 
        /// </summary>
        //public long UserRelateId { get; set; }







    }
    public class SysUserEntityMapper : ClassMapper<SysUserEntity>
    {
        public SysUserEntityMapper()
        {
            Table("sys_user");
            Map(m => m.RoleCode).Ignore();
            Map(m => m.UserTypeName).Ignore();
            //Map(m=>m.CompanyName).Ignore();
            AutoMap();
        }
    }
}
